package cn.sytton.taffecloud.common.base.config;

import cn.hutool.core.io.IoUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

/**
 * 自定义启动Banner
 *
 * @author skyrock
 */
@Slf4j
//@Component
public class Banner implements CommandLineRunner {
    @Value("${banner:}")
    private String banner;

    @Override
    public void run(String... args) throws Exception {
        if (StringUtils.hasText(banner)) {
            log.info("\n\n"+banner+"\n");
        }
    }
}
